package com.service.impl;

import java.util.List;

import com.dao.IMessageDao;
import com.model.Message;
import com.service.IMessageService;

public class MessageServiceImpl implements IMessageService {
	
	private IMessageDao messageDao;
	
	public void setMessageDao(IMessageDao messageDao) {
		this.messageDao = messageDao;
	}

	@Override
	public void save(Message message) {
		messageDao.save(message);		
	}	

	@Override
	public List<Message> getAll() {
		return messageDao.getAll();
	}

	@Override
	public void delete(Integer id) {
		messageDao.delete(id);		
	}

	@Override
	public Message get(Integer id) {
		return messageDao.get(id);
	}

	@Override
	public void update(Message message) {
		messageDao.update(message);
	}

	@Override
	public void saveOrUpdate(Message o) {
		messageDao.saveOrUpdate(o);
	}

	@Override
	public List<Message> getAll(String hql) {
		return messageDao.getAll(hql);
	}

	@Override
	public List<Message> getAll(String hql, int page, int rows) {
		return messageDao.getAll(hql, page, rows);
	}

	@Override
	public int count(String hql) {
		return messageDao.count(hql);
	}

}
